<template>
  <div id="app">
    <app-header v-if="isShow" />
    <router-view class="container" />
    <app-footer v-if="isShow" />
  </div>
</template>
<script>
import AppHeader from '@/components/AppHeader';
import AppFooter from '@/components/AppFooter';
import '@/assets/icon/iconfont.css'
export default {
  name: 'app',
  components: {
    AppHeader,
    AppFooter
  },
  watch: {
    '$route.path': function (path) {
      if (path === '/login') {
        this.isShow = false
      } else {
        this.isShow = true
      }
    }
  },
  data () {
    return {
      isShow: true
    }
  }
}
</script>
<style lang="less" scoped>
#app {
  height: 100%;
}
.container {
  padding: 50px 10px;
}
</style>